﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;

namespace ConexionBD
{
    public partial class FormMostLib : Form
    {
        MySqlConnection Conexion = new MySqlConnection();
        string cadena;
        public string stConsulta;
        public FormMostLib()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void richTextBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void FormMostLib_Load(object sender, EventArgs e)
        {
            string nickname = "google_id";
            Libreta ml = new Libreta();
            DataTable dt = new DataTable();
            dt = ml.mostLibreta(nickname);
            try
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                    comboBox1.Items.Add(dt.Rows[i]["nombre_libreta"]);
            }

            catch (MySqlException error)
            {
                throw error;
            }
        }
    }
}
